<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算圆的面积和周长</title>
</head>
<body>
    <script>
       
        function getArea(r) {
            return Math.PI * Math.pow(r, 2);
        }

       
        function getLong(r) {
            return 2 * Math.PI * r;
        }

        
        var radius = 5; 
        var area = getArea(radius);
        var long = getLong(radius);

        console.log("半径为 " + radius + " 的圆，面积为 " + area + "，周长为 " + long);
    </script>
</body>
</html>